import Vue from 'vue'
import VueRouter from 'vue-router'


import Main from '../components/Main.vue'
// import Test from '../components/test.vue'
import UserInfo from '../components/UserInfo.vue'
 import UserOrder from '../components/UserOrder.vue'
import Register from '../components/Register.vue'
import Login from '../components/Login.vue'



Vue.use(VueRouter)

export default new VueRouter({
    mode: 'history',
    routes: [
        { path: '/', component: Main, name: 'main' },
        { path: '/user/info/:id', component: UserInfo, name: 'userinfo' },
        { path: '/user/order/:id', component: UserOrder, name: 'userorder' },
        // { path: '/member/:id', component: Member, name: 'member' },
        // { path: '/test', component: Test, name: 'test' },
        { path: '/login', component: Login, name: 'login' },
        { path: '/register', component: Register, name: 'register' },
        { path: '*', redirect: '/' }
    ]
})